package com.hgxd.mc.utils;

import java.util.ArrayList;
import java.util.List;

public class ReversByteStringUtil {

    public static String reByteStr(String str) {

        List<String> srtList = new ArrayList<>();

        for (int i = 0; i < str.length(); i += 2) {
            srtList.add(str.substring(i, (i + 2)));
        }

        String result = "";
        for (int j = srtList.size() - 1; j >= 0; j--) {
            result += srtList.get(j);
        }

        return result;
    }
}
